<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="net.sureon.app.AppContext"%>
<%
	String errorMsg = (String)request.getAttribute("errorMsg");
	String successMsg = (String) request.getAttribute("successMsg");
 %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>修改密码</title>
		<style type="text/css">
.style5 {
	width: 100%;
}
</style>

		<style type="text/css">
.style1 {
	width: 100%;
}

.style2 {
	font-size: xx-small;
	font-family: Arial;
}

.style3 {
	font-size: xx-small;
	font-family: Arial;
}

.style4 {
	font-size: small;
}
</style>
		<style type="text/css">
.ctl00_Navigation11_Menu1_0 {
	background-color: white;
	visibility: hidden;
	display: none;
	position: absolute;
	left: 0px;
	top: 0px;
}

.ctl00_Navigation11_Menu1_1 {
	color: #284E98;
	font-family: Verdana;
	font-size: Small;
	text-decoration: none;
}

.ctl00_Navigation11_Menu1_2 {
	color: #284E98;
	background-color: #B5C7DE;
	font-family: Verdana;
	font-size: Small;
}

.ctl00_Navigation11_Menu1_3 {
	
}

.ctl00_Navigation11_Menu1_4 {
	padding: 2px 5px 2px 5px;
}

.ctl00_Navigation11_Menu1_5 {
	
}

.ctl00_Navigation11_Menu1_6 {
	padding: 2px 5px 2px 5px;
}

.ctl00_Navigation11_Menu1_7 {
	background-color: #B5C7DE;
}

.ctl00_Navigation11_Menu1_8 {
	color: #FF9900;
	font-weight: normal;
}

.ctl00_Navigation11_Menu1_9 {
	background-color: #507CD1;
}

.ctl00_Navigation11_Menu1_10 {
	
}

.ctl00_Navigation11_Menu1_11 {
	background-color: #507CD1;
}

.ctl00_Navigation11_Menu1_12 {
	color: White;
}

.ctl00_Navigation11_Menu1_13 {
	color: White;
	background-color: #284E98;
}

.ctl00_Navigation11_Menu1_14 {
	color: White;
}

.ctl00_Navigation11_Menu1_15 {
	color: White;
	background-color: #284E98;
}
.style1 {
	width: 100%;
}
</style>

<script type="text/javascript">
	function checkForm() {
		if(document.changePasswordForm.currentPwd.value == "") {
			alert("当前密码不能够为空");
			document.changePasswordForm.currentPwd.focus();
			return false;
		} 
		if(document.changePasswordForm.newPwd.value == "" || document.changePasswordForm.newPwd.value.length < 6) {
				alert("新密码不能够少于6位");
				document.changePasswordForm.newPwd.focus();
				return false;
		}
		 if(document.changePasswordForm.confirmNewPwd.value == "" || document.changePasswordForm.confirmNewPwd.value.length < 6) {
				alert("确认信密码不能够少于6位");
				document.changePasswordForm.confirmNewPwd.focus();	
				return false;
		} 
		 if(document.changePasswordForm.confirmNewPwd.value != document.changePasswordForm.newPwd.value) {
				alert("两次输入的密码不一致");
				document.changePasswordForm.confirmNewPwd.focus();
				return false;
		} 
		return true;
	}
</script>


	</head>
	<body>
	<%
		boolean flag = false;
		
		net.sureon.app.UserSession userSesssion = (net.sureon.app.UserSession)request.getSession().getAttribute(net.sureon.app.UserSession.HTTP_SESSION_KEY);
		flag = userSesssion.isRootLogin();
			
		if(flag == true) {
	%>
		<jsp:include page="../sysAdmin/systemHeader.jsp" />
	<%
		} else {
	 %>
	 	<jsp:include page="../header.jsp" />
	 <%
	 	}
	  %>
		<br />
		
		<form name="changePasswordForm" method="post" action="<%=request.getContextPath() %>/user/changePassword.do"
			onsubmit="javascript:return WebForm_OnSubmit();" id="aspnetForm">

			<div>
				<table cellpadding="0" cellspacing="0" class="style1">
					<tr>
						<td colspan="2">

							<table cellpadding="0" cellspacing="0" class="style5">
								<tr>
									<td style="text-align: right">
										<span id="ctl00_ContentPlaceHolder1_Label4"
											style="font-size: small">输入当前密码：</span>
										<input name="currentPwd"
											type="password" id="ctl00_ContentPlaceHolder1_TextBox1"
											style="height: 16px;" />
									</td>
									<td>
										<span id="ctl00_ContentPlaceHolder1_CompareValidator1"
											style="color: Red; font-size: small;"><%=(errorMsg == null || "".equals(errorMsg)) ? "" : errorMsg %></span>
									</td>
								</tr>
								<tr>
									<td style="text-align: right">
										<span id="ctl00_ContentPlaceHolder1_Label5"
											style="font-size: small">输入新设密码：</span>
										<input name="newPwd"
											type="password" id="ctl00_ContentPlaceHolder1_TextBox2"
											style="height: 16px;" />
									</td>
									<td>
										<span
											id="ctl00_ContentPlaceHolder1_RegularExpressionValidator1"
											style="color: black; font-size: small;"> &nbsp;&nbsp;提示：密码不能少于6个字符！</span>
									</td>
								</tr>
								<tr>
									<td style="text-align: right">
										<span id="ctl00_ContentPlaceHolder1_Label6"
											style="font-size: small">确认新设密码：</span>
										<input name="confirmNewPwd"
											type="password" id="ctl00_ContentPlaceHolder1_TextBox3"
											style="height: 16px;" />
											<input type="hidden" name="isFirstGo" value="yes" />
									</td>
									<td>
										<span id="ctl00_ContentPlaceHolder1_CompareValidator2"
											style="color: #224499; font-size: small;"><%=(successMsg == null || "".equals(successMsg)) ? "" : successMsg %></span>
									</td>
								</tr>
								<tr>
									<td style="text-align: right">
										<input type="submit" name="ctl00$ContentPlaceHolder1$Button1"
											value="更 新"
											onclick="return checkForm()"
											id="ctl00_ContentPlaceHolder1_Button1"
											style="font-size: small; text-align: center" />
									</td>
									<td>
										&nbsp;
									</td>
								</tr>
							</table>

						</td>
					</tr>
				</table>
			</div>

		</form>
		<jsp:include page="../footer.jsp"></jsp:include>
	</body>
</html>
